<?php
// includes for the TCPDF library
require_once('tcpdf/config/lang/eng.php');
require_once('tcpdf/tcpdf.php');
setlocale(LC_MONETARY, 'en_US');

// PHP Settings to display errors in the script.
ini_set('display_errors', 1);
error_reporting(E_ALL);

// Get the ID of the proposal from the URL
$id = $_GET['id'];

require_once('proposal_query.php');

// Extend the PDF class 
class MYPDF extends TCPDF {
// *****************************************************
//
// Header Definition
//    Place the header graphic
//    Display the company address and Document Title 
//
// *****************************************************
	public function Header() {
		// Set the image quality
		$this->setJPEGQuality(90);
		// Place the image on the page at x=10, y=10, width=50. The null string is a placeholder for a hyperlink.
		$this->Image('tcpdf/images/onMilwaukee.jpg', 138, 10, 60, 10, 'JPG', '');
		$this->CreateShadedTextBox('', 130, 22, 60, 10, '', '','');
		// $textval, $x = 0, $y, $width = 0, $height = 10, $fontsize = 10, $fontstyle = '', $align = 'L'
		$this->CreateTextArea('Ads Received: _____            Set up: _______',130, 21, 20, 8, 8, 'B','L');
		$this->CreateTextArea('   Temp Setup: _____    Camp Final: _______',130, 26, 20, 8, 8, 'B','L');
	}
// *****************************************************
//
// Footer Definition
//    Place the footer information
//
// *****************************************************
	public function Footer() {
		$this->SetY(-15);
		$this->SetFont(PDF_FONT_NAME_MAIN, '', 8);
		$this->SetTextColor(200);
		$this->Cell(0, 10, '', 0, false, 'C');
		$this->line(15,280,199,280,array('width' => .5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 192, 0)));
		$this->CreateTextArea('                             OnMilwaukee.com  |  1930 E. North Ave. 2nd Floor  |  Milwaukee, WI 53202  |  (p) 414.272.0557  |  (f) 414.615.7676 ', 5, 280, 199, 7, 7, 'I','L');

	}
// *****************************************************
//
// End of Header and Footer Definitions
//
// *****************************************************

// This is a text area with no box around the text.	
	public function CreateTextArea($textval, $x = 0, $y, $width = 0, $height = 10, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+10, $y); // 10 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(0,0,20);
		$this->Cell($width, $height, $textval, 0, false, $align);
	}
	public function CreateClientTextArea($textval, $x = 0, $y, $width = 0, $height = 10, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+10, $y); // 10 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(192,0,0); // Red font
		$this->Cell($width, $height, $textval, 0, false, $align);
	}
// This is a text area WITH a box around the text.
	public function CreateTextBox($textval, $x = 0, $y, $width = 0, $height = 10, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+12, $y); // 12 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(0,0,20);
		//$w,$h,$txt,$border = 0,$align = 'J',$fill = false,$ln = 1,$x = '',$y = '',$reseth = true,$stretch = 0,$ishtml = false,$autopadding = true,$maxh = 0,$valign = 'T',$fitcell = false
		$this->MultiCell($width, $height, $textval, 1, $align, false , 0,'','', true,0,false,true,6,'M',true);
	}
// This is a text area WITH a box around the text.
	public function CreateSmallCheckBox($textval, $x = 0, $y, $width = 0, $height = 10, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+10, $y); // 10 = margin left
		$this->SetFont('arialunicid0','B',8);
		$this->SetTextColor(192,0,0);
		$this->SetFillColor(255,255,255); // set the fill color 
		//$w,$h,$txt,$border = 0,$align = 'J',$fill = false,$ln = 1,$x = '',$y = '',$reseth = true,$stretch = 0,$ishtml = false,$autopadding = true,$maxh = 0,$valign = 'T',$fitcell = false
		$this->MultiCell($width, $height, $textval, array('LTRB' => array('width' => .1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) , 'C', true , 0,'','', true,0,false,true,10,'M',true);
//		$this->Cell($width, $height, $textval, 1, false, $align, true);
	}
// This is a purple shaded a text area WITH a box around the text.
	public function CreateHeaderTextBox($textval, $x = 0, $y, $width = 0, $height = 10, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+10, $y); // 10 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(192,0,0);
		$this->SetFillColor(200); // set the fill color as light gray
		$this->Cell($width, $height, $textval, 1, false, $align, true);
	}
// This is a gray shaded a text area WITH a box around the text.
	public function CreateTotalTextBox($textval, $x = 0, $y, $width = 0, $height = 10, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+10, $y); // 10 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(255,255,255);
		$this->SetFillColor(200); // set the fill color as light gray
		$this->Cell($width, $height, $textval, 1, false, $align, true);
	}
// This is a shaded a text area WITHOUT a box around the text.
	public function CreateHeaderArea($textval, $x = 0, $y, $width = 0, $height = 8, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+12, $y); // 12 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(192,0,0);
		$this->SetFillColor(200); // set the fill color as light gray
		$this->Cell($width, $height, $textval, 0, false, $align, true,'',0,false,'','B');
//		$this->MultiCell($width, $height, $textval, 0, $align, true , 0,'','', true,0,false,true,6,'B',true);
	}
// This is a PINK shaded a text area WITHOUT a box around the text.
	public function CreatePinkTextArea($textval, $x = 0, $y, $width = 0, $height = 8, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+12, $y); // 12 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(0,0,0);
		$this->SetFillColor(244,159,174); // set the fill color as light gray
		$this->Cell($width, $height, $textval, 0, false, $align, true,'',0,false,'','B');
//		$this->MultiCell($width, $height, $textval, 0, $align, true , 0,'','', true,0,false,true,6,'B',true);
	}
// This is a Salmon shaded a text area WITHOUT a box around the text.
	public function CreateSalmonTextArea($textval, $x = 0, $y, $width = 0, $height = 8, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+12, $y); // 12 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(242,208,214);
		$this->SetFillColor(242,208,214); // set the fill color as light gray
		$this->Cell($width, $height, $textval, 0, false, $align, true,'',0,false,'','B');
//		$this->MultiCell($width, $height, $textval, 0, $align, true , 0,'','', true,0,false,true,6,'B',true);
	}
// This is a Purple shaded a text area WITHOUT a box around the text.
	public function CreatePurpleTextArea($textval, $x = 0, $y, $width = 0, $height = 8, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+12, $y); // 12 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(0,0,0);
		$this->SetFillColor(228,204,249); // set the fill color as light gray
		$this->Cell($width, $height, $textval, 0, false, $align, true,'',0,false,'','B');
//		$this->MultiCell($width, $height, $textval, 0, $align, true , 0,'','', true,0,false,true,6,'B',true);
	}
// This is a Skin shaded a text area WITHOUT a box around the text.
	public function CreateSkinTextArea($textval, $x = 0, $y, $width = 0, $height = 8, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+12, $y); // 12 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(0,0,0);
		$this->SetFillColor(255,230,214); // set the fill color as light gray
		$this->Cell($width, $height, $textval, 0, false, $align, true,'',0,false,'','B');
//		$this->MultiCell($width, $height, $textval, 0, $align, true , 0,'','', true,0,false,true,6,'B',true);
	}
// This is a Skin shaded a text area WITHOUT a box around the text.
	public function CreateYellowTextArea($textval, $x = 0, $y, $width = 0, $height = 8, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+12, $y); // 12 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(0,0,0);
		$this->SetFillColor(255,243,170); // set the fill color as light gray
		$this->Cell($width, $height, $textval, 0, false, $align, true,'',0,false,'','B');
//		$this->MultiCell($width, $height, $textval, 0, $align, true , 0,'','', true,0,false,true,6,'B',true);
	}
	public function CreateClientArea($textval, $x = 0, $y, $width = 0, $height = 8, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+12, $y); // 12 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(192,0,0);
		$this->SetFillColor(255,236,175); // set the fill color as OnMilwaukee yellow
		$this->Cell($width, $height, $textval, 0, false, $align, true,'',0,false,'','B');
//		$this->MultiCell($width, $height, $textval, 0, $align, true , 0,'','', true,0,false,true,6,'B',true);
	}
// This is a shaded text box WITH a box around the text used for the expanding monthly revenue totals at the bottom of the proposal	
	public function CreateShadedFaxTextBox($textval, $x = 0, $y, $width = 0, $height = 10, $fontsize = 9, $fontstyle = 'Ariel', $align = 'C') {
		$this->SetXY($x+10, $y); // 10 = margin left
		$this->SetFont('arialunicid0','B',8);
		$this->SetTextColor(192,0,0);
		$this->SetFillColor(255,236,175); // set the fill color 
		//$w,$h,$txt,$border = 0,$align = 'J',$fill = false,$ln = 1,$x = '',$y = '',$reseth = true,$stretch = 0,$ishtml = false,$autopadding = true,$maxh = 0,$valign = 'T',$fitcell = false
		$this->MultiCell($width, $height, $textval, array('LTRB' => array('width' => .5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 192, 0))) , 'C', true , 0,'','', true,0,false,true,10,'M',true);
//		$this->Cell($width, $height, $textval, 1, false, $align, true);
	}
	public function CreateShadedTextBox($textval, $x = 0, $y, $width = 0, $height = 10, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+10, $y); // 10 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(0,0,20);
		$this->SetFillColor(200); // set the fill color as light gray
		//$w,$h,$txt,$border = 0,$align = 'J',$fill = false,$ln = 1,$x = '',$y = '',$reseth = true,$stretch = 0,$ishtml = false,$autopadding = true,$maxh = 0,$valign = 'T',$fitcell = false
		$this->MultiCell($width, $height, $textval, 1, $align, true , 0,'','', true,0,false,true,10,'M',true);
//		$this->Cell($width, $height, $textval, 1, false, $align, true);
	}
	public function CreateYellowRoundedTextBox($textval, $x = 0, $y, $width = 0, $height = 10, $fontsize = 10, $fontstyle = '', $align = 'L') {
		$this->SetXY($x+10, $y); // 10 = margin left
		$this->SetFont(PDF_FONT_NAME_MAIN, $fontstyle, $fontsize);
		$this->SetTextColor(0,0,20);
		$this->SetFillColor(255,236,175); // set the fill color 
		//$w,$h,$txt,$border = 0,$align = 'J',$fill = false,$ln = 1,$x = '',$y = '',$reseth = true,$stretch = 0,$ishtml = false,$autopadding = true,$maxh = 0,$valign = 'T',$fitcell = false
		$this->MultiCell($width, $height, $textval, array('LTRB' => array('width' => .5, 'cap' => 'round', 'join' => 'round', 'dash' => 0, 'color' => array(255, 192, 0))) , 'C', true , 0,'','', true,0,false,true,10,'M',true);
//		$this->Cell($width, $height, $textval, 1, false, $align, true);
	}
}


// *****************************************************
//
// create a PDF object
//    Define the author, title, subject and kewords of the PDF file
//    Create the Group Header information 
//
// *****************************************************
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
 
// set document (meta) information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('aiMatch, Inc.');
$pdf->SetTitle('Advertising Proposal');
$pdf->SetSubject('Advertising Proposal');
$pdf->SetKeywords('Proposal, Advertising, Agency');
 
// add a page
$pdf->AddPage();
 
// create proposal information box
// Top of Page
// $textval, $x = 0, $y, $width = 0, $height = 10, $fontsize = 10, $fontstyle = '', $align = 'L'
$pdf->CreateTextArea('  Trade Only Contract', 2, 23, 186, 15, 16, 'B','L');
$pdf->line(15,35,199,35,array('width' => .5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 192, 0)));

//-----------
$pdf->CreateHeaderArea('Contract Detail', 2, 40, 186, 4, 9, 'B', 'C');
//
//$textval, $x = 0, $y, $width = 0, $height = 10, $fontsize = 10, $fontstyle = '', $align = 'L'
$pdf->CreateTextArea('Organization:', 5, 45, 35, 8, 8, 'B','L');
$pdf->CreateTextArea('___________________________________________________', 30, 45, 50, 8, 8, '','L');
$pdf->CreateTextArea('OMC Rep:', 120, 45, 25, 8, 8, 'B','L');
$pdf->CreateTextArea('_________________________________', 135, 45, 25, 8, 8,'','L');
//
$pdf->CreateTextArea('Campaign Name:', 5, 52, 35, 8, 8, 'B','L');
$pdf->CreateTextArea($ProposalName, 30, 52, 50, 8, 8, '','L');
$pdf->CreateTextArea('Value:', 120, 52, 25, 8, 8, 'B','L');
$pdf->CreateTextArea(money_format('%(#0n', $TotalBillableAmount), 135, 52, 25, 8, 8,'','L');
//
$pdf->CreateHeaderArea('Contract Information', 2, 60, 186, 4, 9, 'B', 'C');
//
$pdf->CreateTextArea('Reports Requested:', 5, 65, 25, 7, 7, 'B','L');
$pdf->CreateSmallCheckBox(' ', 50, 67.5, 2, 2, 2, '', 'C');
$pdf->CreateTextArea('NO REPORTS', 55, 65, 25, 7, 7, 'B','L');
//
$pdf->CreateSmallCheckBox(' ', 50, 72.5, 2, 2, 2, '', 'C');
$pdf->CreateTextArea('Weekly', 55, 70, 25, 7, 7, 'B','L');
//
$pdf->CreateSmallCheckBox(' ', 50, 75.5, 2, 2, 2, '', 'C');
$pdf->CreateTextArea('Monthly', 55, 73, 25, 7, 7, 'B','L');
//
$pdf->CreateSmallCheckBox(' ', 50, 78.5, 2, 2, 2, '', 'C');
$pdf->CreateTextArea('End of Campaign Only', 55, 76, 25, 7, 7, 'B','L');
//
$pdf->CreateSmallCheckBox(' ', 50, 81.5, 2, 2, 2, '', 'C');
$pdf->CreateTextArea('Other: ______________________________________________', 55, 79, 25, 7, 7, 'B','L');
//
//
$pdf->CreateTextArea('Send Via:', 5, 85, 25, 7, 7, 'B','L');
$pdf->CreateSmallCheckBox(' ', 50, 87.5, 2, 2, 2, '', 'C');
$pdf->CreateTextArea('Snail Mail', 55, 85, 25, 7, 7, 'B','L');
$pdf->CreateSmallCheckBox(' ', 80, 87.5, 2, 2, 2, '', 'C');
$pdf->CreateTextArea('Email:', 85, 85, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('Address:', 95, 85, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('___________________________________________________________', 107, 85, 25, 7, 7, 'B','L');
//
$pdf->CreateTextArea('Contact Name:', 5, 92, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('______________________________________', 25, 92, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('Organization:', 78, 92, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('______________________________________', 96, 92, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('Phone:', 150, 92, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('____________________', 160, 92, 25, 7, 7, 'B','L');
//
$pdf->CreateTextArea('Mailing Address:', 5, 97, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('______________________________________________________________________________________________________________________', 25, 97, 25, 7, 7, 'B','L');
//
$pdf->CreateTextArea('City, State, Zip:', 5, 102, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('______________________________________________________________________________________________________________________', 25, 102, 25, 7, 7, 'B','L');
//
$pdf->CreateHeaderArea('Ad Information', 2, 110, 186, 4, 9, 'B', 'C');
//
$pdf->CreateTextArea('Ad Sizes:', 5, 115, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('______________________________________________________________________________________________________________________', 25, 115, 25, 7, 7, 'B','L');
//
$pdf->CreateTextArea('Ad Names:', 5, 119, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('______________________________________________________________________________________________________________________', 25, 119, 25, 7, 7, 'B','L');
//
$pdf->CreateTextArea('Click URL:', 5, 123, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('______________________________________________________________________________________________________________________', 25, 123, 25, 7, 7, 'B','L');
//
$pdf->CreateTextArea('Ad Start Date:', 5, 127, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('______________________________________________________________________________________________________________________', 25, 127, 25, 7, 7, 'B','L');
//
$pdf->CreateTextArea('Ad End Date:', 5, 131, 25, 7, 7, 'B','L');
$pdf->CreateTextArea('______________________________________________________________________________________________________________________', 25, 131, 25, 7, 7, 'B','L');
//
// - Make the Ad Locations box
$pdf->CreateTextBox('', 2, 138, 186, 132, 8, '', 'C');
// vertical lines
$pdf->line(45,142,45,270,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(80,142,80,270,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(115,142,115,270,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(150,142,150,270,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(194,142,194,270,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
// horizontal lines
$pdf->line(14,142,200,142,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,146,200,146,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,150,200,150,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,154,200,154,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,158,200,158,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,162,200,162,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,166,200,166,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,170,200,170,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,174,200,174,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,178,200,178,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,182,200,182,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,186,200,186,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,190,200,190,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,194,200,194,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,198,200,198,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,202,200,202,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,206,200,206,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,210,200,210,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,214,200,214,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,218,200,218,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,222,200,222,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,226,200,226,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,230,200,230,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,234,200,234,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,238,200,238,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,242,200,242,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,246,200,246,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,250,200,250,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,254,200,254,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,258,200,258,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,262,200,262,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
$pdf->line(14,266,200,266,array('width' => .2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
//
$pdf->CreatePinkTextArea('Ad Locations:', 2.2, 138.2, 185.6, 3, 8, 'B', 'L');
// Top Salmon Boxes
//$pdf->CreateSalmonTextArea('', 33.2, 142.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateSalmonTextArea('', 68.2, 142.2, 34.6, 3, 8, 'B', 'L');
$pdf->CreateSalmonTextArea('', 103.2, 142.2, 34.6, 3, 8, 'B', 'L');
$pdf->CreateSalmonTextArea('', 138.2, 142.2, 43.6, 3, 8, 'B', 'L');
// Total Imps: Yellow Box
$pdf->CreateTextArea('# Impressions: ', 4.2, 146.2, 30.6, 3, 8, 'B', 'L');

// Side Yellow Boxes
$pdf->CreateYellowTextArea('', 33.2, 146.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 150.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 154.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 158.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 162.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 166.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 170.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 174.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 178.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 182.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 186.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 190.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 194.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 198.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 202.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 206.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 210.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 214.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 218.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 222.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 226.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 230.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 234.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 238.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 242.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 246.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 250.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateYellowTextArea('', 33.2, 254.2, 34.6, 3, 8, 'B', 'R');
// Total Imps: Yellow Box
$pdf->CreateYellowTextArea('Total Imps:', 2.2, 266.2, 30.6, 3, 8, 'B', 'L');
// Section Totals
$pdf->CreatePurpleTextArea('Section Totals: ', 33.2, 262.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreatePurpleTextArea('', 68.2, 262.2, 34.6, 3, 8, 'B', 'L');
$pdf->CreatePurpleTextArea('', 103.2, 262.2, 34.6, 3, 8, 'B', 'L');
$pdf->CreatePurpleTextArea('', 138.2, 262.2, 43.6, 3, 8, 'B', 'L');
// Values
$pdf->CreateSkinTextArea('Values: ', 33.2, 266.2, 34.6, 3, 8, 'B', 'R');
$pdf->CreateSkinTextArea('', 68.2, 266.2, 34.6, 3, 8, 'B', 'L');
$pdf->CreateSkinTextArea('', 103.2, 266.2, 34.6, 3, 8, 'B', 'L');
$pdf->CreateSkinTextArea('', 138.2, 266.2, 43.6, 3, 8, 'B', 'L');

//Close and output PDF document
$pdf->Output('AgencyProposal', 'I');

?>